<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript">
 function creatAjax(){
	 alert(0);
	var ajax=null;
	try{
		//IE
		ajax = new ActiveXObject("Micosoft.XMLHTTP");
	}catch(e1){
		try{
			ajax =  new XMLHttpRequest();
			alert(1);
		}catch(e2){
			alert("不支持ajax");
		}
	}
	return ajax;
 }
</script>
<script type="text/javascript">
   document.getElementById("ab").onclick = function(){
	   alert(2);
	   var ajax = creatAjax();
	   if(ajax!=null){
		   alert("支持Ajax");
	   }else{
	       alert("没有Ajax");
	   }
   }
   document.getElementById("aa").onclick=function(){
	   s
	   alert(43);
   }
</script>
</head>
<body>
<input type="button" value="提交" id="ab"/>
<button id="aa">你好</button>
</body>
</html>